 :root {
  --azul-mar: #a6adaf;
  --azul-cielo-claro: #87CEEB;
  --turquesa-agua: #5BB4C8;
  --arena-volcanica: #6B6B6B;
  --arena-mojada: #4A4A4A;
  --dorado-sol: #F4A460;
  --naranja-calido: #E8925C;
  --durazno: #FFDAB9;
  --azul-atardecer: #6B9BB5;
  --terracota: #C97A5F;
  --barro-claro: #D4A574;
  --blanco: #FFFFFF;
  --crema: #FFF8F0;
  --texto: #3A3A3A;
}

/* RESET Y BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Raleway', 'Karla', sans-serif;
  color: var(--azul-atardecer);
  background: linear-gradient(to bottom, var(--crema) 0%, var(--durazno) 50%, var(--crema) 100%);
  background-attachment: fixed;
  line-height: 1.7;
  font-weight: 400;
}

h1, h2, h3, h4 {
  font-family: 'Cinzel', 'Libre Baskerville', serif;
  font-weight: 600;
  letter-spacing: 1.5px;
}

/* HEADER - Cielo y Mar de las fotos */
header {
  background: linear-gradient(to bottom, var(--azul-cielo-claro) 0%, var(--turquesa-agua) 50%, var(--azul-mar) 100%);
  padding: 3rem 1rem;
  text-align: center;
  border-radius: 0 0 35px 35px;
  box-shadow: 0 8px 25px rgba(74, 159, 189, 0.25);
  position: relative;
}

.logo {
  display: block;
  max-width: 350px;
  margin: auto;
  transform: scale(1.5);
  transition: transform 0.3s ease;
  border-radius: 25px;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

.logo:hover {
  animation: logoFloat 5s ease-in-out infinite;
}

@keyframes logoFloat {
  0% { transform: translateY(0) scale(1.5); }
  50% { transform: translateY(-15px) scale(1.5); }
  100% { transform: translateY(0) scale(1.5); }
}

.logo-visible {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

header h1 {
  color: var(--blanco);
  font-size: 3rem;
  margin-top: 1rem;
  text-shadow: 2px 4px 10px rgba(0, 0, 0, 0.25);
  font-weight: 800;
  letter-spacing: 1px;
}

/* NAVEGACIÓN */
nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 3rem 0 0 0;
  flex-wrap: wrap;
}

nav ul li {
  margin: 1rem;
}

nav ul li a {
  color: var(--blanco);
  text-decoration: none;
  font-weight: 700;
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.4);
  font-size: 1.05rem;
}

nav ul li a:hover {
  background: var(--dorado-sol);
  border-color: var(--dorado-sol);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(244, 164, 96, 0.4);
}

/* HERO */
.hero {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 3rem 2rem;
  background: transparent;
  text-align: center;
  margin: 2rem auto;
  max-width: 1200px;
}

.contenido-hero {
  flex: 1;
  padding-right: 2rem;
  min-width: 300px;
}

.hero h2 {
  background: linear-gradient(125deg, var(--terracota), var(--azul-mar));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  font-weight: 800;
}

.hero p {
  color: var(--texto);
  font-size: 1.4rem;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero img {
  flex: 1;
  min-width: 300px;
  max-height: 400px;
  max-width: 100%;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(74, 159, 189, 0.25);
  border: 5px solid var(--azul-mar);
}

/* GALERÍA */
.galeria {
  padding: 4rem 2rem;
  text-align: center;
  background: transparent;
}

.galeria h3 {
  background: linear-gradient(135deg, var(--terracota), var(--azul-mar));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 2.8rem;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  font-weight: 800;
}

.galeria h3::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 5px;
  background: linear-gradient(to right, var(--dorado-sol), var(--azul-mar));
  border-radius: 3px;
}

.productos {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.5rem;
}

.producto-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 250px;
  max-width: 300px;
}

.producto-container h4 {
  background: linear-gradient(135deg, var(--naranja-calido), var(--turquesa-agua));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
  font-weight: 700;
}

.producto {
  width: 100%;
  background: var(--blanco);
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.4s ease;
  box-shadow: 0 5px 20px rgba(74, 159, 189, 0.15);
  border: 3px solid var(--durazno);
}

.producto:hover {
  transform: translateY(-12px);
  box-shadow: 0 15px 40px rgba(74, 159, 189, 0.3);
  border-color: var(--azul-mar);
}

.producto img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: 15px;
  margin-bottom: 1.2rem;
  border: 4px solid var(--terracota);
  background: var(--blanco);
  transition: transform 0.3s ease;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(201, 122, 95, 0.2);
}

.producto img:hover {
  transform: scale(2.5);
  position: relative;
  z-index: 10;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.producto p {
  color: var(--azul-mar);
  font-weight: 700;
  margin-bottom: 1.2rem;
  font-size: 1.15rem;
}

.btn-ver-mas {
  display: inline-block;
  background: linear-gradient(135deg, var(--azul-mar), var(--dorado-sol));
  color: var(--blanco);
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(74, 159, 189, 0.35);
}

.btn-ver-mas:hover {
  background: linear-gradient(135deg, var(--dorado-sol), var(--azul-mar));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 159, 189, 0.4);
}

.producto:hover .btn-ver-mas {
  background: linear-gradient(135deg, var(--terracota), var(--turquesa-agua));
}

/* SOBRE MÍ */
.sobre-mi-contenido {
  display: flex;
  align-items: center;
  gap: 3rem;
  flex-wrap: nowrap;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

.foto-sobre-mi {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 8px 25px rgba(74, 159, 189, 0.3);
  border: 6px solid var(--turquesa-agua);
  flex-shrink: 0;
}

.sobre-mi-contenido p {
  flex: 1;
  font-size: 1.15rem;
  line-height: 1.9;
  color: var(--texto);
}

/* CONTACTO DESPLEGABLE */
.contacto {
  background: linear-gradient(135deg, var(--azul-mar), var(--turquesa-agua), var(--azul-cielo-claro));
  padding: 2rem 5rem;
  text-align: center;
  margin: 3rem auto;
  position: relative;
  overflow: hidden;
  width: 80%;
  border-radius: 25px;
}

.contacto-header {
  cursor: pointer;
  padding: 2rem;
  transition: all 0.3s ease;
}

.contacto-header:hover {
  transform: scale(1.02);
}

.contacto-header h3 {
  color: var(--blanco);
  font-size: 2.8rem;
  margin-bottom: 1rem;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.flecha-toggle {
  display: inline-block;
  transition: transform 0.4s ease;
  font-size: 2rem;
}

.flecha-toggle.activo {
  transform: rotate(180deg);
}

.contacto-texto {
  color: var(--blanco);
  font-size: 1.2rem;
  margin-top: 0.5rem;
  opacity: 0.9;
}

.formulario-contenedor {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.5s ease, opacity 0.4s ease;
  opacity: 0;
  padding: 0 2rem;
}

.formulario-contenedor.activo {
  max-height: 800px;
  opacity: 1;
  padding: 2rem;
}

.contacto form {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
  background: var(--blanco);
  padding: 3rem;
  border-radius: 25px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.contacto label {
  color: var(--terracota);
  font-weight: 700;
  font-size: 1.1rem;
}

.contacto input,
.contacto textarea {
  width: 100%;
  padding: 1.1rem;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  border: 2px solid var(--durazno);
  border-radius: 12px;
  background-color: var(--crema);
  font-family: 'Raleway', sans-serif;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.contacto input:focus,
.contacto textarea:focus {
  outline: none;
  border-color: var(--azul-mar);
  box-shadow: 0 0 15px rgba(74, 159, 189, 0.3);
  background-color: var(--blanco);
}

.contacto button {
  margin-top: 1rem;
}

/* BOTONES GENERALES */
.boton {
  display: inline-block;
  background: linear-gradient(135deg, var(--dorado-sol), var(--naranja-calido));
  color: var(--blanco);
  padding: 1.1rem 2.5rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(244, 164, 96, 0.4);
}

.boton:hover {
  background: linear-gradient(135deg, var(--azul-mar), var(--turquesa-agua));
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(74, 159, 189, 0.5);
}

/* PIE DE PÁGINA */
footer {
  background: linear-gradient(135deg, var(--terracota), var(--azul-mar));
  color: var(--blanco);
  text-align: center;
  padding: 3rem 2rem;
  margin-top: 3rem;
}

footer p {
  margin: 0.8rem 0;
  font-size: 1.05rem;
}

/* BOTONES FLOTANTES */
#btnUp {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 14px 18px;
  font-size: 26px;
  background: linear-gradient(135deg, var(--dorado-sol), var(--azul-mar));
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  box-shadow: 0 5px 20px rgba(74, 159, 189, 0.4);
  transition: all 0.3s ease;
  z-index: 1000;
}

#btnUp:hover {
  background: linear-gradient(135deg, var(--azul-mar), var(--dorado-sol));
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 30px rgba(74, 159, 189, 0.6);
}

#btnHome {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 65px;
  height: 65px;
  background: var(--blanco);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(74, 159, 189, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
  border: 5px solid var(--azul-mar);
}

#btnHome img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#btnHome:hover {
  transform: scale(1.15);
  box-shadow: 0 10px 30px rgba(74, 159, 189, 0.5);
  border-color: var(--dorado-sol);
}

/* RESPONSIVO */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    align-items: center;
    padding-top: 2rem;
  }

  nav ul li {
    margin: 0.5rem 0;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding: 3rem 1.5rem;
  }

  .contenido-hero {
    padding-right: 0;
    margin-bottom: 2rem;
  }

  .producto {
    min-width: 100%;
  }

  header h1 {
    font-size: 2.3rem;
  }

  .hero h2 {
    font-size: 2.8rem;
  }

  .galeria h3 {
    font-size: 2.2rem;
  }

  .sobre-mi-contenido {
    flex-direction: column;
    text-align: center;
  }

  .sobre-mi-contenido p {
    font-size: 1.05rem;
  }

  .contacto {
    width: 95%;
    padding: 1.5rem 1rem;
    border-radius: 20px;
  }

  .contacto-header h3 {
    font-size: 2.2rem;
  }

  .contacto-texto {
    font-size: 1rem;
  }

  .contacto form {
    padding: 2rem 1.5rem;
  }

  .formulario-contenedor.activo {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 600px) {
  .sobre-mi-contenido {
    flex-direction: column;
    text-align: center;
  }

  .sobre-mi-contenido p {
    font-size: 1.05rem;
  }
}